SpecControlView{
	
	var c, numberBox, randName, col, cols, row1Height, v, dataSlider, feedbackWidget, pluginButton, spec, fn, container;
	
	
	*new{|win, argbounds, nameArg|
		^super.new.init(win, argbounds, nameArg);
	}
	
	init{|win, argbounds, nameArg|
		var bounds;
		bounds = Rect(0,0,380,43);
		container = FlowView.new(win, bounds);
		this.subInit(win, argbounds, nameArg);
	}
	
	subInit{|win, argbounds, name|

		fn = {};
		
		SCStaticText(container, Rect(0,0,100,15)).string_(name);
		
		container.decorator.nextLine;
		
		spec = ControlSpec.new;
		
		c = SCSlider( container, Rect(0,20,100,15) );
		dataSlider = c;
		c.background_(RippleGuiConstants.getShadeColor);
		c.canFocus = false;
		c.action_({|dataSlider|
			numberBox.value_(this.value.round(0.001));
			fn.value(this);
		});
		
		numberBox = SCNumberBox.new(container, Rect(113, 19, 40, 15));
		numberBox.canFocus = false;
		numberBox.setProperty(\boxColor,RippleGuiConstants.getShadeColor);

	}

	
	action_{|fnArg|
		fn = fnArg;	
	}
	
	
	
	value_{|val|
		dataSlider.value_(spec.unmap(val));
		numberBox.value_(val.round(0.001));
		^this;
	}
	
	value{
		^spec.map(dataSlider.value)
	}
	
	spec_{|specArg|
		spec = specArg;
		^this;
	}
	
	
}

